package org.blade.personal.component;

import java.io.Serializable;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;

import org.blade.personal.mode.BaseEntity;

public class DaoComponent<T extends BaseEntity<ID>, ID extends Serializable> {

	private CriteriaBuilder criteriaBuilder;
	private CriteriaQuery<T> criteriaQuery;
	private Root<?> root;

	/**
	 * 
	 */
	public DaoComponent() {
	}

	/**
	 * @param criteriaBuilder
	 * @param criteriaQuery
	 * @param root
	 */
	public DaoComponent(CriteriaBuilder criteriaBuilder, CriteriaQuery<T> criteriaQuery, Root<?> root) {
		super();
		this.criteriaBuilder = criteriaBuilder;
		this.criteriaQuery = criteriaQuery;
		this.root = root;
	}

	public CriteriaBuilder getCriteriaBuilder() {
		return criteriaBuilder;
	}

	public void setCriteriaBuilder(CriteriaBuilder criteriaBuilder) {
		this.criteriaBuilder = criteriaBuilder;
	}

	public CriteriaQuery<T> getCriteriaQuery() {
		return criteriaQuery;
	}

	public void setCriteriaQuery(CriteriaQuery<T> criteriaQuery) {
		this.criteriaQuery = criteriaQuery;
	}

	public Root<?> getRoot() {
		return root;
	}

	public void setRoot(Root<?> root) {
		this.root = root;
	}

}
